import 'package:flutter/material.dart';
import 'package:flutterdemo/day02/01_statelesswidget.dart';
void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      // 启动要显示的界面
      home: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("图标组件示例"),
      ),
      body: JKHomeContent(),
    );
  }
}

class JKHomeContent extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return IconButton(
      icon: Icon(Icons.volume_up, size: 48.0,),
      tooltip: '按下操作',
      onPressed: () {
        print("按下操作");
      },
    );
  }
}


